require 'stringio'
require_relative 'decommenter'
string = <<EOM
# This is a comment
This isn't a comment
# This is.
    # So is this.
This is also not a comment.
EOM
puts string
infile = StringIO.new(string)
outfile = StringIO.new("")
Decommenter.decomment(infile,outfile)
puts "-------------------------------"
puts outfile.string
puts "Test succeeded" if outfile.string == <<EOM
This isn't a comment.
This is also not a comment.
EOMmmmmmmmmmmmmmmmmmmmmmmm